package cn.huiyunche.base.service.mappers.ext;

import cn.huiyunche.base.service.model.CTurnover;
import cn.huiyunche.base.service.model.CTurnoverExample;
import cn.huiyunche.base.service.vo.CTurnoverAdminVo;
import cn.huiyunche.base.service.vo.CTurnoverDWaybillVo;
import cn.huiyunche.base.service.vo.CTurnoverVeneerVo;
import cn.huiyunche.base.service.vo.CTurnoverVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface CTurnoverViewMapper {

    int batchInsert(@Param(value = "list") List<CTurnover> cTurnovers);

    int updateBnoByBillid(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId
            , @Param(value = "userType") int userType, @Param(value = "payTypes") List<Integer> payTypeList, @Param(value = "userIdSet") Set<Long> userIdSet, @Param(value = "status") int status);

    int updateBnoByBillidNoUser(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId
            , @Param(value = "userType") int userType, @Param(value = "payTypes") List<Integer> payTypeList
            , @Param(value = "userIdSet") Set<Long> userIdSet, @Param(value = "status") int status);

    List<CTurnover> selectByUserIdAndOrderId(@Param(value = "userId") Long userId, @Param(value = "orderId") Long orderId);

    List<CTurnoverVo> selectByExample(CTurnoverExample example);

    int updateBnoByCompanyBillid(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate, @Param(value = "userId") Long userId
            , @Param(value = "userType") int userType, @Param(value = "payTypes") List<Integer> payTypeList, @Param(value = "status") int status);

    List<CTurnoverDWaybillVo> selectDWaybillByExample(Map<String, Object> paramsMap);

    int countDWaybillByExample(Map<String, Object> paramsMap);


    /**
     * 同城 明细计数
     *
     * @param paramsMap
     * @return
     */
    int countVeneerDetails(Map<String, Object> paramsMap);

    /**
     * 同城 明细列表
     *
     * @param paramsMap
     * @return
     */
    List<CTurnoverVeneerVo> selectVeneerDetails(Map<String, Object> paramsMap);

    // 人送项目 账单流水计数
    int countByConditions(Map<String, Object> paramsMap);

    // 人送项目 账单流水
    List<CTurnoverAdminVo> selectByConditions(Map<String, Object> paramsMap);

}